#ifndef MYWIDGET_H
#define MYWIDGET_H

#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTableWidget>
#include <QSplitter>

#include "imageviewer.h"
#include "transforminfo.h"
#include "global_flag.h"

/// Central widget for the main window
class MyWidget : public QWidget
{
    Q_OBJECT

    ImageViewer* _originalImageViewer;
    ImageViewer* _modifiedImageViewer;
    QLabel _originalPlaceHolder;
    QLabel _modifiedPlaceHolder;

    QImage* _modifiedImage;

    QTableWidget* _table;
    int _rows;

    QSplitter* _imageSplitter;
    QSplitter* _mainSplitter;
    QVBoxLayout* _mainLayout;
private slots:
    void ver_moved(int);
    void hor_moved(int);
public:
    explicit MyWidget(QWidget *parent = 0);
    ~MyWidget();
    void set_original(QImage *img);
    void set_modified(QImage* img);
    void add_info(const TransformInfo info);
    void wheelEvent(QWheelEvent* e);
    void zoom_in();
    void zoom_out();
    void zoom_reset();
    void swap();
signals:

public slots:

};

#endif // MYWIDGET_H
